from xjlibrary.our_file_dir import BaseDir


class FileDeal(object):

    def __init__(self):
        self.setobj = set()

    def read_file(self, filepath):
        """
        读取文件每一行到集合中
        :param file:
        :return:
        """
        for line in BaseDir.read_file_r_mode_yield(filepath):
            self.setobj.add(line)
